﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models.world.vos.actors.machines {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;

    public class WaitingRoomMachineVO extends AbstractMachineVO {

        public function WaitingRoomMachineVO(_arg1:Object, _arg2:IEventDispatcher){
            super(_arg1, _arg2);
        }
        override public function handlePatient(_arg1:ITreatable):void{
            if (_arg1.state == WorldConstants.PATIENT){
                dispatch(new InfoEvent(EventConstants.PATIENT_SPEECH_BUBBLE_UPDATE, _arg1.id));
                dispatch(new InfoEvent(EventConstants.CHECK_AVAILABLE_ROOM, null, _arg1));
            } else {
                dispatch(new InfoEvent(EventConstants.ENFORCE_NEXT_PATIENT_ACTION, _arg1.id, ((("Patient " + _arg1.id) + " in the waiting room is not a patient but ") + _arg1.state)));
            };
        }

    }
}//package net.wooga.pets.models.world.vos.actors.machines 
